package cn.hdr.train.concurrent;

import java.util.PriorityQueue;
import java.util.Random;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.TimeUnit;

/**
 * @author: hdr
 * @date: 2020-09-07 15:54
 */
public class BQTest {

//    private static SynchronousQueue<String> blockQueue = new SynchronousQueue<>();
//
//
//    public static void main(String[] args) throws Exception {
//        new Thread(()->{
//            try {
//                System.out.println("线程1开始等待");
//                String value = blockQueue.take();
//                System.out.println("线程1接收消息"+ ": "+ value);
//            }catch (Exception e){
//                e.printStackTrace();
//            }
//        }).start();
//
//        new Thread(()->{
//            try {
//                System.out.println("线程2开始等待");
//                String value1 = blockQueue.take();
//                System.out.println("线程2接收消息"+ ": "+ value1);
//            }catch (Exception e){
//                e.printStackTrace();
//            }
//        }).start();
//
////        Thread.sleep(100);
//
//        String msg = "1";
//        System.out.println("投递消息: " + msg);
//        boolean flag= blockQueue.offer(msg);
//        System.out.println("投递结果："+ flag);
//
//        String msg1 = "2";
//        System.out.println("投递消息: " + msg1);
//        boolean flag1 = blockQueue.offer(msg1);
//        System.out.println("投递结果："+ flag1);
//    }

    public static void main(String[] args) throws InterruptedException {

        System.out.println(0x0204);


    }

}